home *** CD-ROM | disk | FTP | other *** search
- /*
- ** MacWT -- a 3d game engine for the Macintosh
- ** © 1995, Bill Hayden and Nikol Software
- ** Free for non-commercial use - address questions to the e-mail address below
- **
- ** Mail: afn28988@freenet.ufl.edu (Bill Hayden)
- ** MacWT FTP site: ftp.circa.ufl.edu/pub/software/ufmug/mirrors/LocalSW/Hayden/
- ** WWW Page: http://grove.ufl.edu:80/~nikolsw
- **
- ** All of the above addresses are due to changes sometime in 1996, so stay tuned
- **
- ** based on wt, by Chris Laurel
- **
- ** This program is distributed in the hope that it will be useful,
- ** but WITHOUT ANY WARRANTY; without even the implied warranty of
- ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-
- typedef enum { formatGIF87, formatGIF89, formatPPM, formatPICTR, formatUnknown }
- Graphic_file_format;
-
- typedef enum { gfTrueColor, gfPaletted } Graphic_file_type;
-
- typedef struct {
- Graphic_file_type type;
- short height, width;
- long palette_entries;
- long transparent_entry;
- RGBcolor *palette;
- unsigned char *bitmap;
- } Graphic_file;
-
-
- extern Graphic_file *new_graphic_file(void);
- extern void free_graphic_file(Graphic_file *gfile);
- extern Boolean graphic_file_pixel(Graphic_file *gfile, short x, short y, RGBcolor *rgb);
- extern Graphic_file *read_graphic_file(char *filename);
-
- Graphic_file *LoadPPM(FILE *fp, char *filename);
- Graphic_file *LoadGIF(FILE *fp, char *fname );
- Graphic_file *LoadPICTR(FILE *fp, char *fname );